<!DOCTYPE HTML>
<html>
<head>
    <meta charset="UTF-8">
    <link href="plugins/paihang/css/lanrenzhijia.css" type="text/css" rel="stylesheet"/>
    <link href="public/static/css/index/index.css" type="text/css" rel="stylesheet"/>
    <link rel="stylesheet" href="public/static/css/base.css"/>
    <link rel="stylesheet" href="plugins/topNav/css/head.css"/>
    <!--BootStrap 框架-->
    <link rel="stylesheet" type="text/css" href="plugins/bootstrap4.0.0/css/bootstrap.css">
    <link rel="stylesheet" type="text/css" href="plugins/bootstrap4.0.0/css/bootstrap-grid.css">
    <link rel="stylesheet" type="text/css" href="plugins/bootstrap4.0.0/css/bootstrap-reboot.css">
    <script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.5.1/jquery.js"></script>
    <script src="public/js/index.js"></script>

</head>
<script>
    $(function () {

        $.get("index", {}, function (data) {


            //判断状态码
            if (data.status == 200) {
                let num1 = 1;
                let num2 = 1;
                let num3 = 1;
                let html1 = "";
                let html2 = "";
                let html3 = "";
                let html4 = "";
                let html5 = "";
                let html6 = "";
                let html7 = "";


                //循环遍历data中的films
                for (let i = 0; i < data.data.films.length; i++) {

                    console.log(data.data.films[i])

                    if (data.data.films[i].cateLogName != null && "电影" == data.data.films[i].cateLogName) {

                        if (num1 <= 10) {

                            html1 += "<li class=\"float-left\">" +
                                "<a href=detail.html?film_id=" + data.data.films[i].id + ">" +
                                "<div class='t_img' title=" + data.data.films[i].typeName + ">" +
                                "<img class='lazy rounded img-fluids' src=" + data.data.films[i].image + "  />" +
                                "</div>" +
                                "</a>" +
                                "<div class='t_info'>" +
                                "<p style='color:#00AFE4;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;'>\n" +
                                data.data.films[i].name + "</p>\n" +
                                "                        <p>" + data.data.films[i].onDecade + "</p>\n" +
                                "                    </div>\n" +
                                "                </li>";

                            html5 += "<li class=\"checkPic\"><span class= ph1 >" + (num1++) + "</span> <a target= _blank  title= 美丽人生 href=detail.html?film_id="+ data.data.films[i].id  + " >"
                                                                 +  data.data.films[i].name + " <span style=float: right;margin-right: 10px;>" + data.data.films[i].updateTime.substr(0, 10) + " </span></a> " +
                                "                            <!--鼠标移入事件加载图片-->" +
                                "                            <div class=\"tips\">\n" +
                                "                                <div class=\"tipscont\">\n" +
                                "                                    <img src=" + data.data.films[i].image + "\n" +
                                "                                         style=\"border:1px solid #ddd;padding: 4px;background: white;\"\n" +
                                "                                         width=\"200px\" height=\"288px\" alt=" + data.data.films[i].name + ">\n" +
                                "                                </div>\n" +
                                "                            </div>\n" +
                                "                        </li>";
                        }


                    }
                    if (data.data.films[i].cateLogName != null && "电视剧" == data.data.films[i].cateLogName) {

                        if (num2 <= 10) {

                            html2 += "<li class=\"float-left\">" +
                                "<a href=detail.html?film_id=" + data.data.films[i].id + ">" +
                                "<div class='t_img' title=" + data.data.films[i].typeName + " />" +
                                "<img class='lazy rounded img-fluids' src=" + data.data.films[i].image + " />" +
                                "</div>" +
                                "</a>" +
                                "<div class='t_info'>" +
                                "<p style='color:#00AFE4;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;'>\n" +
                                data.data.films[i].name + "</p>\n" +
                                "                        <p>" + data.data.films[i].onDecade + "</p>\n" +
                                "                    </div>\n" +
                                "                </li>";

                            html6 += "<li class=\"checkPic\"><span class=\"ph1\">" + (num2++) + "</span> <a target= _blank  title= 美丽人生 href=detail.html?film_id="+ data.data.films[i].id  + " >"
                                +  data.data.films[i].name + " <span style=float: right;margin-right: 10px;>" + data.data.films[i].updateTime.substr(0, 10) + " </span></a> " +
                                "                            <!--鼠标移入事件加载图片-->\n" +
                                "                            <div class=\"tips\">\n" +
                                "                                <div class=\"tipscont\">\n" +
                                "                                    <img src=" + data.data.films[i].image + "\n" +
                                "                                         style=\"border:1px solid #ddd;padding: 4px;background: white;\"\n" +
                                "                                         width=\"200px\" height=\"288px\" alt=" + data.data.films[i].name + " />\n" +
                                "                                </div>\n" +
                                "                            </div>\n" +
                                "                        </li>";
                        }
                    }

                    if (data.data.films[i].cateLogName != null && "动漫" == data.data.films[i].cateLogName) {

                        if (num3 <= 10) {
                            html3 += "<li class=\"float-left\">" +
                                "<a href=detail.html?film_id=" + data.data.films[i].id + ">" +
                                "<div class='t_img' title=" + data.data.films[i].typeName + ">" +
                                "<img class='lazy rounded img-fluids' src=" + data.data.films[i].image + " />" +
                                "</div>" +
                                "</a>" +
                                "<div class='t_info'>" +
                                "<p style='color:#00AFE4;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;'>\n" +
                                data.data.films[i].name + "</p>\n" +
                                "                        <p>" + data.data.films[i].onDecade + "</p>\n" +
                                "                    </div>\n" +
                                "                </li>";
                            html7 += "<li class=\"checkPic\"><span class=\"ph1\">" + (num3++) + "</span> <a target= _blank  title= 美丽人生 href=detail.html?film_id="+ data.data.films[i].id  + " >"
                                +  data.data.films[i].name + " <span style=float: right;margin-right: 10px;>" + data.data.films[i].updateTime.substr(0, 10) + " </span></a> " +
                                "                            <!--鼠标移入事件加载图片-->\n" +
                                "                            <div class=\"tips\">\n" +
                                "                                <div class=\"tipscont\">\n" +
                                "                                    <img src=" + data.data.films[i].image + "\n" +
                                "                                         style=\"border:1px solid #ddd;padding: 4px;background: white;\"\n" +
                                "                                         width=\"200px\" height=\"288px\" alt=" + data.data.films[i].name + " />\n" +
                                "                                </div>\n" +
                                "                            </div>\n" +
                                "                        </li>";

                        }

                    }


                }
                //循环遍历data中的cateLogs
                for (let i = 0; i < data.data.cateLogs.length; i++) {
                    html4 += "<li class=\"nav-item\">\n" +
                        "                        <a class=\"nav-link\" href=\"/\">" + data.data.cateLogs[i].name + "</a>\n" +
                        "                    </li>"

                }

                $("#recommend_movies").html(html1);
                $("#recommend_teleplay").html(html2);
                $("#recommend_cartoon").html(html3);
                $("#cate").append(html4);
                $("#movierank").append(html5);
                $("#videorank").append(html6);
                $("#cartoonrank").append(html7);
            }

        });
    });
</script>

<!--30%  60%debug-->
<body>
<div class="container">
    <div style="width: 100%;height: auto;overflow:hidden;    margin-bottom: 10px;">
        <!-- 头部begin -->
        <nav class="navbar navbar-expand-md bg-dark navbar-dark fixed-top">
            <a class="navbar-brand" href="/">欢迎来到xx最新影片资源</a>
            <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#collapsibleNavbar">
                <span class="navbar-toggler-icon"></span>
            </button>
            <div class="collapse navbar-collapse" id="collapsibleNavbar">
                <ul id="cate" class="nav navbar-nav navbar-right">
                    <li class="nav-item">
                        <a class="nav-link" data-toggle="modal" data-target="#myModal" href="javascript:;"></a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" id="register_input" href="registerInput.html"></a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="javascript:;">|</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="index.html">首页</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="cate(new).html?cataLog_id=f39c979857a4874a0157a4a6a4fe0000">电影</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="cate(new).html?cataLog_id=f39c979857a4c8c50157a8ea80700018">电视剧</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="cate(new).html?cataLog_id=f39c979857a4c8c50157a8eaaee30019">动漫</a>
                    </li>
                </ul>
            </div>
        </nav>
    </div>


    <!--登录 END-->
    <div class="container" style="margin-top: 50px;">
        <div class="row">
            <div class="col">
                <marquee onmouseover='this.stop()' onmouseout='this.start()'>
                    <a id="globalLoginBtn_register_input"
                       href="registerInput.html">注册</a>
                    |
                    <a data-toggle="modal" data-target="#myModal" href="javascript:;">登录</a>后观看更多高清无码视频
                </marquee>
            </div>
        </div>
        <!--  电影-->
        <div class="row">
            <div class="col-sm-8">
                <div class="mox">
                    <h5>电影最新推荐
                        <span class="float-right" style="margin-right: 10px;cursor: pointer"
                              onclick="location.href='1.html'">更多</span>
                    </h5>
                    <ul id="recommend_movies">


                    </ul>
                </div>
            </div>
            <div class="col-sm-4">
                <div class="case">
                    <ul id="movierank">
                        <h5>电影排行榜</h5>

                        <!-- <li class="checkPic"><span class="ph1">1</span> <a
                                 href="./detail.html?film_id=" target="_blank"
                                 title="美丽人生">美丽人生<span style="float: right;margin-right: 10px;">10-10</span></a>

                             <div class="tips">
                                 <div class="tipscont">
                                     <img src="public/static/upload/filmPic/1476102109462.jpg"
                                          style="border:1px solid #ddd;padding: 4px;background: white;"
                                          width="200px" height="288px" alt="美丽人生">
                                 </div>
                             </div>
                         </li>-->
                    </ul>
                </div>
            </div>
        </div>

        <!-- 电视剧-->
        <div class="row">
            <div class="col-sm-8">
                <div class="mox">
                    <h5>电视剧最新推荐
                        <span class="float-right" style="margin-right: 10px;cursor: pointer"
                              onclick="location.href='1.html'">更多</span>
                    </h5>
                    <ul id="recommend_teleplay">
                        <!--分割 -->
                        <li class="float-left">
                            <a href="detail.html?film_id=">
                                <div class="t_img" title="${li.name}">
                                    <img class="lazy rounded img-fluids"
                                         src="public/static/upload/filmPic/1476102109462.jpg"
                                         data-original=""/>
                                </div>
                            </a>
                            <div class="t_info">
                                <p style="color:#00AFE4;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;">
                                    电影名称
                                </p>
                                <p>typeName-li.onDecade</p>
                            </div>
                        </li>
                    </ul>
                </div>
            </div>
            <div class="col-sm-4">
                <div class="case">
                    <ul id="videorank">
                        <h5>电视剧排行榜</h5>
                        <!--<li class=""><span class="ph1">1</span> <a
                                href="./detail.html?film_id=" target="_blank"
                                title="美丽人生">美丽人生<span style="float: right;margin-right: 10px;">10-10</span></a>
                            <div class="tips">
                                <div class="tipscont">
                                    <img src="public/static/upload/filmPic/1476102109462.jpg"
                                         style="border:1px solid #ddd;padding: 4px;background: white;"

                                         width="200px" height="288px" alt="美丽人生">
                                </div>
                            </div>
                        </li>-->
                    </ul>
                </div>
            </div>
        </div>
        <!-- 动漫 -->
        <div class="row">
            <div class="col-sm-8">
                <div class="mox">
                    <h5>动漫最新推荐
                        <span class="float-right" style="margin-right: 10px;cursor: pointer"
                              onclick="location.href='1.html'">更多</span>
                    </h5>
                    <ul id="recommend_cartoon">

                        <!--<li class="float-left">
                            <a href="detail.html?film_id=">
                                <div class="t_img" title="${li.name}">
                                    <img class="lazy rounded img-fluids"
                                         src="public/static/upload/filmPic/1476102109462.jpg"
                                         data-original=""/>
                                </div>
                            </a>
                            <div class="t_info">
                                <p style="color:#00AFE4;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;">
                                    电影名称
                                </p>
                                <p>typeName-li.onDecade</p>
                            </div>
                        </li>-->
                    </ul>
                </div>
            </div>
            <div class="col-sm-4">
                <div class="case">
                    <ul id="cartoonrank">
                        <h5>动漫排行榜</h5>
                        <!--<li class=""><span class="ph1">1</span> <a
                                href="./detail.html?film_id=" target="_blank"
                                title="美丽人生">美丽人生<span style="float: right;margin-right: 10px;">10-10</span></a>
                            <div class="tips">
                                <div class="tipscont">
                                    <img src="public/static/upload/filmPic/1476102109462.jpg"
                                         style="border:1px solid #ddd;padding: 4px;background: white;"
                                         width="200px" height="288px" alt="美丽人生">
                                </div>
                            </div>
                        </li>-->
                    </ul>
                </div>
            </div>
        </div>
    </div>
    <div id="footer">
        <p>免责声明:如果侵犯了你的权益，请发邮件至：xxx@q.com，我们会及时删除侵权内容，谢谢合作！
        <p>Copyright ©
            鄂ICP备16028726号
            All Rights Reserved.
            <script type="text/javascript">var cnzz_protocol = (("https:" == document.location.protocol) ? " https://" : " http://");
            // document.write(unescape("%3Cspan id='cnzz_stat_icon_1272902876'%3E%3C/span%3E%3Cscript src='" + cnzz_protocol + "s19.cnzz.com/z_stat.php%3Fid%3D1272902876%26show%3Dpic' type='text/javascript'%3E%3C/script%3E"));
            </script>
        </p>
    </div>
</div>

</body>
</html>
